package com.kgc.app.controller;

import com.kgc.app.pojo.EbookCategory;
import com.kgc.app.service.EbookCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 要求：
 *
 * @Date 2021/9/8
 */
@Controller
@RequestMapping("/provider")
public class EbookCategoryController {
    @Autowired
    private EbookCategoryService ebookCategoryService;

    @RequestMapping("/list")
    @ResponseBody
    public List<EbookCategory> list(){
        return ebookCategoryService.selectcategory();
    }
}
